<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/include/taglib.jsp"%>
<html>
	<head>
		<meta name="viewport"
			content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="format-detection" content="telephone=no">
		<meta charset="UTF-8">
		<title>共富网-体验金</title>

		<link href="/game/redpack/css/redPacket.css" type="text/css"
			rel="stylesheet" />
		<script src="/v3/js/jquery-1.10.2.min.js"></script>
		<script src="/game/redpack/js/jquery.hbalerts.js"
			type="text/javascript"></script>
		<style type="text/css">
.rechargeHistoryMain {
	padding-top: 30px;
}

.rechargeHistoryButtom {
	margin: 40px 0;
}

.rechargeHPMain {
	background: url(/game/redpack/images/redPacket1.png) no-repeat;
	background-size: 115px;
}

.rechargeHistoryTitle {
	padding: 5px 0;
	overflow: hidden;
	background-color: #fff;
	color: #e62828;
	font-size: 18px;
}

.rechargeHistoryTitle .rechargeHistoryTp1 {
	float: left;
	margin-left: 10px;
}

.rechargeHistoryTitle .rechargeHistoryTp2 {
	float: right;
	margin-right: 10px;
}

.rechargeHPMainFalse {
	color: #8c8877;
}
</style>
		
	</head>
	<body>
		<div class="wztkjPopUpBox" style="display: none;">
			<div class="wztkjPopUpBoxMain">
				<div class="wztkjPopUpBoxContent1">
					<img src="/game/redpack/images/popUpBoxMark_03_06.png" />
				</div>
				<div class="wztkjPopUpboxBg">
					<div class="wztkjPopUpBoxContent2"></div>
					<div class="wztkjPopUpBoxContent3">
						<p class="wztkjPopUpboxP">
							取消
						</p>
						<p class="wztkjPopUpboxP1">
							确定
						</p>
						<div style="display: none;"></div>
					</div>
					<div class="wztkjPopUpBoxContent4" style="display: none;">
						确定
					</div>
				</div>
			</div>
		</div>
		<div class="robAfterMain">
			<div class="sendEnvelopes rechargeHistoryMain">
				<div class="sendEnvelopes-main">
					<div class="redPacketPMain rechargeHPMain">
						<div class="redPacketBorder">
						<c:choose>
							<c:when test="${not empty wechatInfoMap}">
								<img src="${wechatInfoMap.headimgurl }" />
							</c:when>
							<c:otherwise>
								<img src="/game/redpack/images/0.png" />
							</c:otherwise>
						</c:choose>						</div>
					</div>
					<div class="sendEnvelopes-name">
						${wechatInfoMap.nickname }
					</div>
					<div class="sendEnvelopes-tips">
						<span>体验金余额：</span><b>${availableEliteMap.amount }</b><i>元</i>
					</div>
					<div
						class="wxAlertCMBotton robAfterBotton robAfterBotton1 rechargeHistoryButtom">
						<a href="/showMyRedpackList.do">立即使用</a>
					</div>
					<div class="rechargeHistoryTitle">
						<p class="rechargeHistoryTp1">
							充值号码
						</p>
						<p class="rechargeHistoryTp2">
							充值体验金
						</p>
					</div>
					<div id="rechargelogsdiv"></div>
				</div>
			</div>
		</div>
		<script type="text/javascript">
		var ajaxpageno = 0;
		function ajax_rechargelist(pageno){
			if(pageno){
				ajaxpageno = pageno;
				var myurl = 'ajax_rechargelist.jsp?pageNo='+pageno;
				 $.ajax({
			         url: myurl,
			         type: "POST",
			         success: function(data) {
			        	$('#rechargelogsdiv').append(data);
			         }
			      });
			}
		}
		$(function() {
			ajax_rechargelist(1);
		})
		
		$(window).scroll(function(){
			　　var scrollTop = $(this).scrollTop();
			　　var scrollHeight = $(document).height();
			　　var windowHeight = $(this).height();
			　　if(scrollTop + windowHeight >= scrollHeight){
			　　　　	var totalpage = $("#totalpage").val();
			　　　　	var no = $(".pageNo").last().text();
			　　　　var pageno = parseInt(no)+1;
					if(ajaxpageno!=pageno){
						if(totalpage != no){
							ajax_rechargelist(pageno);
						}
					}
			　　}
			});
	</script>
	</body>
</html>